//
//  PlayerTableViewCell.m
//  片刻
//
//  Created by lanou3g on 15/6/10.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "PlayerTableViewCell.h"
#import "MaocHeader.h"
@implementation PlayerTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(5, 5, SCREEN_WIDTH - 50, 40)];
        [self.contentView addSubview:_nameLabel];
        self.uersLabel = [[UILabel alloc] initWithFrame:CGRectMake(5, 40, SCREEN_WIDTH - 50, 20)];
        _uersLabel.font = [UIFont systemFontOfSize:10];
        [_uersLabel setTextColor:[UIColor grayColor]];
        [self.contentView addSubview:_uersLabel];
    }
    return self;
}
-(void)setModel:(RadioModel *)model
{
    if (_model != model) {
        [_model release];
        _model = [model retain];
        _nameLabel.text = model.title;
        NSDictionary *ditc = model.playInfo[@"userinfo"];
        _uersLabel.text = [NSString stringWithFormat:@"by:%@",ditc[@"uname"]];
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end










